﻿using System.Windows.Forms;

namespace ToolKitManagerIESiteList.Util
{
    internal static class MessageExtender
    {
        public static void ShowError(this Form frm, string Messsage, string Title)
        {
            MessageBox.Show(frm, Messsage, Title, MessageBoxButtons.OK, MessageBoxIcon.Error);
        }
        public static void ShowWarning(this Form frm, string Messsage, string Title)
        {
            MessageBox.Show(frm, Messsage, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }
        public static void ShowInformation(this Form frm, string Messsage, string Title)
        {
            MessageBox.Show(frm, Messsage, Title, MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
        public static bool ShowQuestion(this Form frm, string Messsage, string Title)
        {
            var result = MessageBox.Show(frm, Messsage, Title, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            return result == DialogResult.Yes;
        }
    }
}
